<template>
  <div>
    <h2>A组件</h2>
    <h2>value: {{ value }}</h2>
    <button @click="clickHadnler">点我触发自定义事件</button>
  </div>
</template>
<script>
export default {
  name: "AComp",
  data() {
    return {};
  },
  methods: {
    clickHadnler() {
      this.$emit("input", "kitty");
    },
  },
  props: ["value"],
};
</script>

<style lang="less" scoped></style>
